package ghostcat.parse
{
    import flash.display.*;

    public class DisplayParse extends Parse
    {

        public function DisplayParse()
        {
            return;
        }// end function

        public function createSprite() : Sprite
        {
            var _loc_1:* = new Sprite();
            parse(_loc_1);
            return _loc_1;
        }// end function

        public function createShape() : Shape
        {
            var _loc_1:* = new Shape();
            parse(_loc_1);
            return _loc_1;
        }// end function

        public function parseGraphics(param1:Graphics) : void
        {
            return;
        }// end function

        override public function parse(param1) : void
        {
            super.parse(param1);
            if (param1 is DisplayObject)
            {
                parseDisplay(param1 as DisplayObject);
            }
            if (param1 is DisplayObjectContainer)
            {
                parseContainer(param1 as DisplayObjectContainer);
            }
            if (param1 is Graphics)
            {
                parseGraphics(param1 as Graphics);
            }
            if (param1 is BitmapData)
            {
                parseBitmapData(param1 as BitmapData);
            }
            var _loc_2:* = param1 && param1.hasOwnProperty("graphics") ? (param1["graphics"] as Graphics) : (null);
            if (_loc_2)
            {
                parseGraphics(_loc_2);
            }
            return;
        }// end function

        public function parseBitmapData(param1:BitmapData) : void
        {
            return;
        }// end function

        public function parseContainer(param1:DisplayObjectContainer) : void
        {
            return;
        }// end function

        public function parseDisplay(param1:DisplayObject) : void
        {
            return;
        }// end function

        public static function createSprite(param1:Array) : Sprite
        {
            var _loc_2:* = new Sprite();
            create(param1).parse(_loc_2);
            return _loc_2;
        }// end function

        public static function create(param1:Array) : DisplayParse
        {
            var _loc_2:* = new DisplayParse;
            _loc_2.children = param1;
            return _loc_2;
        }// end function

        public static function createShape(param1:Array) : Shape
        {
            var _loc_2:* = new Shape();
            create(param1).parse(_loc_2);
            return _loc_2;
        }// end function

    }
}
